package com.zd.shopping.viewholder;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.zd.shopping.R;
import com.zd.shopping.bean.WmOmNoticeIEntity;
import com.zd.shopping.bean.WmTmsNoticeIEntity;
import com.zwz.mall.listener.OnItemClickListener;
import com.zwz.mall.viewholder.BaseViewHolder;

import butterknife.BindView;

/**
 * Created by 张默默 on 2020/3/13.
 */

public class DeliverGoodsDetailsViewHolder extends BaseViewHolder {
    @BindView (R.id.tv_goodsname)
    TextView mTvname;
    @BindView (R.id.tv_goodsid)
    TextView mTv_id;
    @BindView (R.id.tv_number)
    TextView mTv_number;
    public OnItemClickListener mOnItemClickListener;
    public DeliverGoodsDetailsViewHolder(View itemView) {
        super (itemView);
    }

    @Override
    public void bindView(int position, Object obj, Context context) {
        if (obj instanceof WmTmsNoticeIEntity){
            WmTmsNoticeIEntity wmTmsNoticeIEntity = (WmTmsNoticeIEntity) obj;
            mTvname.setText (wmTmsNoticeIEntity.getGoodsName ());
            mTv_id.setText ("商品编号："+wmTmsNoticeIEntity.getGoodsId ());
            mTv_number.setText (wmTmsNoticeIEntity.getGoodsQua ()+" "+wmTmsNoticeIEntity.getGoodsUnit ());
        }
    }
}
